﻿using System.Windows;
using System.Windows.Media;

namespace Xioa_UI.DataOrigin;

public class LinearBrushAttach
{
    /// <summary>
    /// Top Brush
    /// </summary>
    public static readonly DependencyProperty TopBrushProperty = DependencyProperty.RegisterAttached(
        "TopBrush", typeof(Brush), typeof(LinearBrushAttach), new PropertyMetadata(default(Brush)));

    public static void SetTopBrush(DependencyObject element, Brush value)
        => element.SetValue(TopBrushProperty, value);

    public static Brush GetTopBrush(DependencyObject element)
        => (Brush)element.GetValue(TopBrushProperty);
    
    /// <summary>
    /// Center Brush
    /// </summary>
    public static readonly DependencyProperty CenterBrushProperty = DependencyProperty.RegisterAttached(
        "CenterBrush", typeof(Brush), typeof(LinearBrushAttach), new PropertyMetadata(default(Brush)));

    public static void SetCenterBrush(DependencyObject element, Brush value)
        => element.SetValue(CenterBrushProperty, value);

    public static Brush GetCenterBrush(DependencyObject element)
        => (Brush)element.GetValue(CenterBrushProperty);
    
    
    /// <summary>
    /// Bottom Brush
    /// </summary>
    public static readonly DependencyProperty BottomBrushProperty = DependencyProperty.RegisterAttached(
        "BottomBrush", typeof(Brush), typeof(LinearBrushAttach), new PropertyMetadata(default(Brush)));

    public static void SetBottomBrush(DependencyObject element, Brush value)
        => element.SetValue(BottomBrushProperty, value);

    public static Brush GetBottomBrush(DependencyObject element)
        => (Brush)element.GetValue(BottomBrushProperty);
}